<template>
  <div class="qianggou">
    <div class="left" ></div>
    <div class="tuan_list" v-for="(item, index) in qianggou1" :key="index">
      <img :src="item.picture" alt="" />
      <div class="letter">
        <span class="han">{{ item.name }}</span>
        <h3>买一送一明星黄宝|用心火烤肉质紧实鲜汁多嫩爆爆团</h3>
        <span class="bao">爆爆团价</span>
        <span class="price"
          >￥
          <span>{{ item.min_price }}</span>
          <span class="dis">{{ item.promotion_info }}</span>
        </span>
        <div class="qiang">马上抢</div>
        <span class="sale">{{ item.month_saled_content }}</span>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import {getBaoListData } from "../../../api/baobao";
export default {
  data() {
    return {
      qianggou1: [],
    }
  },
  mounted() {
    getBaoListData({ status: 0 }).then((res) => {
      console.log(res);
      this.qianggou1 = res.data.list;
    });
  },
};
</script>

<style lang="scss">
.qianggou {
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
  box-sizing: border-box;
  padding-left: 10px;
  padding-right: 10px;
  position: relative;
  .left {
    width: 80px;
    height: 35px;
    background-color: rgba(0, 128, 128, 0.162);
    position: absolute;
    top: -45px;
  }
  .tuan_list {
    height: 163px;
    width: 100%;
    padding: 0px 0 10px 0;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    img {
      width: 130px;
      height: 130px;
      margin-top: 10px;
    }
    .letter {
      flex: 1;
      height: 150px;
      padding-left: 10px;
      display: flex;
      flex-direction: column;
      position: relative;
      .han {
        display: block;
        font-size: 14px;
        width: 100%;
        height: 20px;
        text-align: left;
        color: rgb(72, 67, 67);
      }
      h3 {
        width: 100%;
        height: 40px;
        font-size: 16px;
      }
      .bao {
        font-size: 14px;
        display: block;
        height: 20px;
        text-align: left;
        margin-top: 8px;
        color: orangered;
      }
      .price {
        text-align: left;
        color: orangered;
        margin-top: 5px;
        position: relative;
        span {
          font-size: 28px;
          color: orangered;
        }
        .dis {
          position: absolute;
          border: 1px solid orangered;
          top: 3px;
          margin-left: 5px;
          font-size: 14px;
          text-align: center;
          line-height: 20px;
        }
      }
      .qiang {
        width: 70px;
        height: 35px;
        position: absolute;
        right: 10px;
        bottom: 25px;
        border-radius: 20px;
        text-align: center;
        line-height: 35px;
        font-weight: 700;
        color: white;
        background-color: red;
      }
      .sale {
        position: absolute;
        bottom: 5px;
        right: 10px;
        font-size: 12px;
        color: orangered;
      }
    }
  }
}
</style>